function verifyLogin(url) {
    let cnt = 0;
    let cookie = '';
    let r = Math.random();
    let yzm_url = getHome(url) + '/index.php/verify/index.html';
    log(`验证码链接:${yzm_url}`);
    let submit_url = getHome(url) + '/index.php/ajax/verify_check';
    log(`post登录链接:${submit_url}`);
    while (cnt < OCR_RETRY) {
        try {
            let {cookie, html} = reqCookie(yzm_url + '?r=' + r, {toBase64: true});
            let code = OcrApi.classification(html);
            log(`第${cnt + 1}次验证码识别结果:${code}`);
            html = post(submit_url, {
                headers: {Cookie: cookie},
                body: 'type=search&verify=' + code,
            });
            html = JSON.parse(html);
            
            if (html.code === 1) {
                log(`第${cnt + 1}次验证码提交成功`);
                log(cookie);
                return cookie // 需要返回cookie
            } else if (html.code !== 1 && cnt + 1 >= OCR_RETRY) {
                cookie = ''; // 需要清空返回cookie
            }
        } catch (e) {
            log(`第${cnt + 1}次验证码提交失败:${e.message}`);
            if (cnt + 1 >= OCR_RETRY) {
                cookie = '';
            }
        }
        cnt += 1
    }
    return cookie
}

globalThis.verifyLogin = verifyLogin;
var rule = {
  title: '耐看',
  host: 'https://www.tongyuhotel.cn/',
  url: '/s/fyclass/page/fypage.html',
  searchUrl: '/vodsearch/-------------.html?wd=**',
  searchable: 2,
  quickSearch: 0,
  filterable: 0,
  filter: '',
  filter_url: '',
  filter_def: {},
  headers: {
    'User-Agent': 'MOBILE_UA',
  },
  timeout: 5000,
  //class_parse: '.flex.around&&li;a&&Text;a&&href;.*/(.*?).html',
  class_name:'电影&连续剧&综艺&动漫',
  class_url:'dianying&lianxuju&zongyi&dongman',
  //cate_exclude: '明星|我的|排行榜|留言板',
  play_parse: true,
  lazy: `js:
let kcode = request(input).match(/<iframe(.*?)/)[1];
let kurl = 'http'+kcode.match(/http(.*?),/)[1];
if (/\\.(m3u8|mp4)/.test(kurl)) {
    input = { jx: 0, parse: 0, url: kurl }
} else {
    input = { jx: 0, parse: 1, url: input }
}`,
  double: true,
  推荐: '*',
  一级: '.item-container.col-4;a&&title;a&&data-original;p&&Text;a&&href',
  二级: {
                title: 'h1&&Text',
                img: 'img&&data-src',
                desc: '.meta-item:lt(3)&&Text',
                content: '.mt-4.text-break&&Text',
                tabs: '.mt-3&&dt',
                lists: '.tempWrap:eq(#id) li'
            },
    搜索: '.item-container.col-4;.title&&Text;a&&data-original;.cover-text&&Text;a&&href',
}